{include file="public/header" /}
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
<div class='page'>
    <a href="/index.php/admin/product/goods_setting_info.html?commonid={$goods.goods_commonid}" class="btn" title="返回上一步">返回上一步</a>
      <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
       <thead>
           <tr>
               <th colspan="6">基本信息</th>
           </tr>
       </thead>
       <tbody>
           <tr>
               <th style="width: 100px;" >商品名称及规格名：</th>
               <td style="width: 300px;"  >{$goods.goods_name}</td>
               <th style="width: 100px;"  >商品编码：</th>
               <td>{$goods.goods_code|default='未设置'}</td>
               <th style="width: 100px;"  >商品厂家：</th>
               <td>{$goods.goods_factory|default='未设置'}</td>
           </tr>
             <tr>
               <th>商品分类：</th>
               <td>{$goods_info.gc_name}</td>
               <th>商品品牌：</th>
               <td>{$goods_info.brand_name}</td>
               <th>生产/贴牌</th>
               <td><?php if(empty($goods['goods_production'])){
                  echo '未设置';
               }else if($goods['goods_production']==1){ ?>
                生产
                <?php }else if($goods['goods_production']==2){ ?>
                贴牌
              <?php }?>
               </td>
           </tr>
           <tr>
               <th >商品产地：</th>
               <td>{$goods.address|default='未设置'}</td>
               <th>商品发货地：</th>
               <td>{$goods.hair_address|default='未设置'}</td>
               <th>送货设置：</th>
               <td>
                   <?php if(empty($goods['waybill_type'])){
                  echo '未设置';
               }else if($goods['waybill_type']==1){ ?>
                   自提+送货上门
                   <?php }else if($goods['waybill_type']==2){ ?>
                   自提
                   <?php }else if($goods['waybill_type']==3){?>
                   送货上门
                   <?php } ?>
               </td>
           </tr>
           <tr>
               <th >抛货/重货：</th>
               <td> <?php if(empty($goods['is_w_v'])){
                  echo '未设置';
               }else if($goods['is_w_v']==1){ ?>
                   抛货
                   <?php }else if($goods['is_w_v']==2){ ?>
                   重货
                   <?php } ?></td>
               <th>商品重量(kg)：</th>
               <td>{$goods.weight|default='未设置'}</td>
               <th>商品包装：</th>
               <td>{$goods.packing|default='未设置'}</td>
           </tr>
           <tr>
               <th>包装尺寸-长(m)：</th>
               <td>{$goods.packing_long|default='未设置'}</td>
               <th>包装尺寸-宽(m)：</th>
               <td>{$goods.packing_width|default='未设置'}</td>
               <th>包装尺寸-高(m)：</th>
               <td>{$goods.packing_high|default='未设置'}</td>
           </tr>
           <tr>
               <th>质保期限：</th>
               <td><?php echo $warranty_period_text[$goods['warranty_period']]; ?></td>
             <!--  <th>包装尺寸-宽(m)：</th>
               <td>{$goods.packing_width|default='未设置'}</td>
               <th>包装尺寸-高(m)：</th>
               <td>{$goods.packing_high|default='未设置'}</td>-->
           </tr>

       </tbody>
      </table>
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
        <tr>
            <th colspan="6">平台加价信息</th>
        </tr>
        </thead>
        <tr>
            <th style="width: 152px;">积分：</th>
                <td>{$goods.score|default='未设置'}</td>
            

            <th style="width: 152px;" >是否含有安装费：</th>
            <td><?php if($goods['install_money']==0){
                  echo '不含有';
               }else{ ?>
                含有
                <?php }?></td>
            <th style="width: 152px;" >安装工时：</th>
            <td><?php if($goods['install_money']==0){
                  echo '0';
               }else{  echo $goods['install_money'].'';  }?></td>
        </tr>
        <tr>
            <th>平台分享(提成)加价模式：</th>
            <td><?php if(empty($goods['t_type'])){
                  echo '未设置';
               }else if($goods['t_type']==1){ ?>
                百分比
                <?php }else if($goods['t_type']==2){ ?>
                固定加价
                <?php } ?></td>
            <th>平台分享(提成)加价模式值：</th>
            <td><?php if(empty($goods['t_type'])){
                  echo '未设置';
               }else if($goods['t_type']==1){ ?>
                 {$goods.t_value}%
                <?php }else if($goods['t_type']==2){ ?>
                {$goods.t_value}元
                <?php } ?></td>
            <th>平台分享(提成)售价：</th>
            <td>{$goods.t_price}元</td>
        </tr> <tr>
        <th>平台分享(加价)加价模式：</th>
        <td><?php if(empty($goods['t_type'])){
                  echo '未设置';
               }else if($goods['t_type']==1){ ?>
            百分比
            <?php }else if($goods['t_type']==2){ ?>
            固定加价
            <?php } ?></td>
        <th>平台分享(提成)加价模式值：</th>
        <td><?php if(empty($goods['g_type'])){
                  echo '未设置';
               }else if($goods['g_type']==1){ ?>
            {$goods.g_value}%
            <?php }else if($goods['g_type']==2){ ?>
            {$goods.g_value}元
            <?php } ?></td>
        <th>平台分享(提成)售价：</th>
        <td>{$goods.g_price}元</td>
    </tr>
    </table>

    <?php if(empty($goods['area'])){  ?>
           <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
               <thead>
               <tr>
                   <th colspan="6">商品销售信息</th>
               </tr>
               </thead>
               <tr>
                   <th  style="width: 100px;" >商品销售区域：</th>
                   <td>未设置</td>
               </tr>
           </table>
    <?php }else{ ?>
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
        <tr>
            <th colspan="6">商品销售信息</th>
        </tr>
        </thead>
        <tr>
            <th  style="width: 100px;" >商品销售区域：</th>
            <td>{$goods['area_name']}</td>
        </tr>
    </table>
    <?php  }?>
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <tr>
            <th  style="width: 100px;" >是否支持换货：</th>
            <td><?php if(!isset($goods['change_goods'])&&$goods['change_goods']==""){ echo '未设置'; }else if($goods['change_goods']==1){echo '支持';}else if($goods['change_goods']==0){echo '不支持';} ?></td>
            <th  style="width: 100px;" >是否支持退货：</th>
            <td><?php if(!isset($goods['return_goods'])&&$goods['return_goods']==""){ echo '未设置'; }else if($goods['return_goods']==1){echo '支持';}else if($goods['return_goods']==0){echo '不支持';} ?></td>
        </tr>
    </table>

        <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
            <thead>
           <tr>
               <th colspan="6">基本文件信息</th>
           </tr>
       </thead>
         <?php if(empty($goods['files_info'])){  ?>
            <tr>
                <th>说明书文件：</th>
                <td><ul>
                    <li>暂无上传</li>
                </ul></td>

            </tr>
         <?php }else{ ?>
          <tr>
               <th>说明书文件：</th>
              <td><ul>
                  <?php foreach($goods['files_info']['old_file_name'] as $k=>$v){  ?>
                  <li><a href="{$http_name}/{$goods['files_info']['new_file_name'][$k]}" target="_blank">{$v}</a></li>
                  <?php } ?>
              </ul></td>

           </tr>
            <?php  }?>
         </table>

</div>
<script>
  $(function(){
    $('#file_button').click(function(){
       var files = $(this).val();
      $.ajax({
                          //请求方式
                          type : "POST",
                          //请求地址
                          url : "getWord",
                          //数据，json字符串
                          data : {'files':files},
                          //请求成功
                          success : function(result) {
                             alert(result);
                          },
                          //请求失败，包含具体的错误信息
                          error : function(e){
                              console.log(e.status);
                              console.log(e.responseText);
                          }
                      });
    });
    });
  
 
   
      
        



    
</script>